#include <bits/stdc++.h>

#define in read()
#define fi first
#define se second
#define pb push_back

using namespace std;

using pii = pair < int , int >;
using vec = vector < int >;
using veg = vector < pii >;
using ill = __int128;
using ll = long long;
using db = double;

const int mod = 998244353;
const int inv2 =  (mod + 1) >> 1;
const int inv3 = (mod + 1) / 3;

ll n,ans;

inline ll c0(ll x) { return x < 0 ? 0 : x / 2; }
inline ll c1(ll x) { return x < 0 ? 0 : x / 2 + (x & 1); }

int main() {
	cin >> n;
	for(ll t = 1;t * t <= n;t++) {
		if(t & 1) ans = (ans + c1(n / t) - c1(t - 1)) % mod;
		else ans = (ans + c0(n / t) - c0(t - 1)) % mod;
	}
	ans = (ans + mod) % mod;
	printf("%lld\n",ans); return 0;
}
